package com.creditdnepr.freebank;

import java.util.List;

import android.app.Application;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class FreeBank extends Application {

	public boolean isNetworkOnline() {
        NetworkInfo ni = ((ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
        return ((ni != null) && (ni.isConnected()));
	}
	
	public boolean isGPSPresent() {
		List<String> l = ((LocationManager)getSystemService(LOCATION_SERVICE)).getAllProviders();
		return l.contains("gps");
	}
	
	
}
